/*
 * @Author: your name
 * @Date: 2021-04-14 00:09:02
 * @LastEditTime: 2021-05-30 13:09:33
 * @LastEditors: Please set LastEditors
 * @Description: 材料总结
 * @FilePath: /medicine-web/src/store/modules/summary.js
 */
import rest from './../rest'
const summary = {
  state: {},
  mutations: {},
  actions: {
    async getMaterialList({ commit }, data) { // 获取材料总结列表
      const res = await rest.get('material/search', data)
      if (res && res.code === 200) {
        return res.data
      }
      return {}
    },
    async getMaterialDetail({ commit }, data) { // 获取材料详情
      const res = await rest.get('material/info', data)
      if (res && res.code === 200) {
        return res.data
      }
      return {}
    },
    async getSummaryStatitics({ commit }, data) { // 获取材料统计
      const res = await rest.get('material/report')
      if (res && res.code === 200) {
        return res.data
      }
      return {}
    }
  },
  getters: {}
}
export default summary